package com.lylg.picture_share.service.impl;

import com.lylg.picture_share.dao.ImageTypeMapper;
import com.lylg.picture_share.entity.ImageType;
import com.lylg.picture_share.service.ImageTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class ImageTypeServiceImpl implements ImageTypeService {
    @Autowired
    ImageTypeMapper imageTypeMapper;
    @Override
    public Integer addImageType(ImageType imageType) {
        return imageTypeMapper.addImageType(imageType);
    }

    @Override
    public Integer deleteImageType(Integer id) {
        return imageTypeMapper.deleteImageType(id);
    }

    @Override
    public Integer updateImageType(ImageType imageType) {
        return imageTypeMapper.updateImageType(imageType);
    }

    @Override
    public List<ImageType> selectAllImageType() {
        return imageTypeMapper.selectAllImageType();
    }

    @Override
    public ImageType selectImageTypeById(Integer id) {
        return imageTypeMapper.selectImageTypeById(id);
    }
}
